package data.content;

import java.io.IOException;

import data.content.visitor.ContentVisitor;

import network.e2e.FrameWriter;

/**
 * Common interface for the immutable content of a data
 * <p>
 * Use visitor pattern
 */

public interface Content {
  
  public <T> T accept(ContentVisitor<T> visitor);
  
  /**
   * Sends self over the net
   * @requires writer not null
   * @param writer the net
   */
  public void send(FrameWriter writer) throws IOException;
  
}
